<?php

namespace NewModule;

use Zend\Mvc\ModuleRouteListener;
use Zend\Mvc\MvcEvent;

class Module {

	public function onBootstrap(MvcEvent $e) {
		// $e->getApplication()->getServiceManager()->get('translator');
		$eventManager = $e->getApplication()->getEventManager();
		$moduleRouteListener = new ModuleRouteListener();
		$moduleRouteListener->attach($eventManager);
	}

	/**
	 * Initialise
	 * @param \Zend\ModuleManager\ModuleManager $manager
	 */
	public function init(\Zend\ModuleManager\ModuleManager $manager) {
		
	}

	/**
	 * Get module configuration from file /config/config.php
	 * 
	 * @return array
	 */
	public function getConfig() {
		return include __DIR__ . '/config/config.php';
	}

	/**
	 * Get autoloader configuration for the module manager
	 * 
	 * @return array
	 */
	public function getAutoloaderConfig() {
		return array(
			'Zend\Loader\StandardAutoloader' => array(
				'namespaces' => array(
					__NAMESPACE__ => __DIR__,
				)
			)
		);
	}

}

?>
